<?php
/**
*
* @author Blackpawn blackpawn666@hotmail.com - http://blackpawnsarchives.net
* @co_author GameCharmer admin@gamecharmer.com - http://gaming.gamecharmer.com
* @package Age of Dragons Mod :: ( Game Console Required )
* @version $Id: quest_post.php 1.1.1 12-26-2009 Blackpawn
* @copyright (c) 2009 Blackpawns Archives
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/

define('GC_MOD', true);
define('IN_PHPBB', true);
define('AOD', true);

$phpbb_root_path =  '../../';
$templates_path = '../../../games/aod/templates/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/mods/game_console/gc_common.' . $phpEx);
include($phpbb_root_path . 'games/aod/common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

// Set custom language path
$user->set_custom_lang_path($phpbb_root_path.'games/aod/language/');

//load our language file
$user->add_lang('common');

// Now add the phpBB language path
$user->set_custom_lang_path($phpbb_root_path . 'language');

// Load the Game Console language file
$user->add_lang('mods/game_console');

if ($user->data['user_id'] == ANONYMOUS)
{
	login_box('', $user->lang['LOGIN']);
}

if ($user->data['is_bot'])
{
	redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
}

// Constants
$error_msgs = null;
$admin = 0;
		
// Vars
$cmd 								= request_var('cmd','');
$quest_name							= request_var('quest_name', '');
$quest_descript						= request_var('quest_descript', '');
$quest_img_path						= request_var('quest_img_path', '');
$quest_level_req 					= request_var('quest_level_req', 0);
$quest_net_req						= request_var('quest_net_req', 0);
$quest_villagers_req 				= request_var('quest_villagers_req', 0);
$quest_spies_req					= request_var('quest_spies_req', 0);
$quest_soldiers_req 				= request_var('quest_soldiers_req', 0);
$quest_macemen_req 					= request_var('quest_macemen_req', 0);
$quest_axemen_req 					= request_var('quest_axemen_req', 0);
$quest_spearmen_req 				= request_var('quest_spearmen_req', 0);
$quest_swordsmen_req 				= request_var('quest_swordsmen_req', 0);
$quest_legionnaires_req 			= request_var('quest_legionnaires_req', 0);
$quest_knights_req 					= request_var('quest_knights_req', 0);
$quest_slingers_req 				= request_var('quest_slingers_req', 0);
$quest_bowmen_req 					= request_var('quest_bowmen_req', 0);
$quest_long_bowmen_req 				= request_var('quest_long_bowmen_req', 0);
$quest_crossbowmen_req 				= request_var('quest_crossbowmen_req', 0);
$quest_light_sword_cavalry_req 		= request_var('quest_light_sword_cavalry_req', 0);
$quest_heavy_sword_cavalry_req 		= request_var('quest_heavy_sword_cavalry_req', 0);
$quest_light_archer_cavalry_req 	= request_var('quest_light_archer_cavalry_req', 0);
$quest_heavy_archer_cavalry_req 	= request_var('quest_heavy_archer_cavalry_req', 0);
$quest_paladin_req 					= request_var('quest_paladin_req', 0);
$quest_dragon_knights_req 			= request_var('quest_dragon_knights_req', 0);
$quest_rams_req 					= request_var('quest_rams_req', 0);
$quest_catapults_req 				= request_var('quest_catapults_req', 0);
$quest_heavy_catapults_req 			= request_var('quest_heavy_catapults_req', 0);
$quest_ballistas_req 				= request_var('quest_ballistas_req', 0);
$quest_trebuchets_req 				= request_var('quest_trebuchets_req', 0);
$quest_chimeras_req 				= request_var('quest_chimeras_req', 0);
$quest_hydras_req 					= request_var('quest_hydras_req', 0);
$quest_basilisks_req 				= request_var('quest_basilisks_req', 0);
$quest_wyverns_req 					= request_var('quest_wyverns_req', 0);
$quest_leviathans_req 				= request_var('quest_leviathans_req', 0);
$quest_dragons_req 					= request_var('quest_dragons_req', 0);
$quest_farms_req 					= request_var('quest_farms_req', 0);
$quest_timber_mills_req 			= request_var('quest_timber_mills_req', 0);
$quest_iron_mines_req 				= request_var('quest_iron_mines_req', 0);
$quest_gold_mines_req 				= request_var('quest_gold_mines_req', 0);
$quest_towers_req 					= request_var('quest_towers_req', 0);
$quest_granaries_req 				= request_var('quest_granaries_req', 0);
$quest_woodsheds_req 				= request_var('quest_woodsheds_req', 0);
$quest_ironpits_req 				= request_var('quest_ironpits_req', 0);
$quest_vaults_req 					= request_var('quest_vaults_req', 0);	
$quest_land_req 					= request_var('quest_land_req', 0);
$quest_stamina_req 					= request_var('quest_stamina_req', 1);
$quest_gold_req 					= request_var('quest_gold_req', 1);
$quest_food_req 					= request_var('quest_food_req', 1);
$quest_wood_req 					= request_var('quest_wood_req', 1);
$quest_iron_req 					= request_var('quest_iron_req', 1);
$quest_min_villagers 				= request_var('quest_min_villagers', 0);
$quest_max_villagers 				= request_var('quest_max_villagers', 0);
$quest_min_gold 					= request_var('quest_min_gold', 0);
$quest_max_gold 					= request_var('quest_max_gold', 0);
$quest_min_food 					= request_var('quest_min_food', 0);
$quest_max_food 					= request_var('quest_max_food', 0);
$quest_min_wood 					= request_var('quest_min_wood', 0);
$quest_max_wood 					= request_var('quest_max_wood', 0);
$quest_min_iron 					= request_var('quest_min_iron', 0);
$quest_max_iron 					= request_var('quest_max_iron', 0);
$quest_min_dragoncoins 				= request_var('quest_min_dragoncoins', 0);
$quest_max_dragoncoins 				= request_var('quest_max_dragoncoins', 0);
$quest_min_exp 						= request_var('quest_min_exp', 0);
$quest_max_exp 						= request_var('quest_max_exp', 0);
$quest_min_soldiers 				= request_var('quest_min_soldiers', 0);
$quest_max_soldiers 				= request_var('quest_max_soldiers', 0);
$quest_min_spies 					= request_var('quest_min_spies', 0);
$quest_max_spies 					= request_var('quest_max_spies', 0);
$quest_min_macemen 					= request_var('quest_min_macemen', 0);
$quest_max_macemen 					= request_var('quest_max_macemen', 0);
$quest_min_axemen 					= request_var('quest_min_axemen', 0);
$quest_max_axemen 					= request_var('quest_max_axemen', 0);
$quest_min_spearmen 				= request_var('quest_min_spearmen', 0);
$quest_max_spearmen 				= request_var('quest_max_spearmen', 0);
$quest_min_swordsmen 				= request_var('quest_min_swordsmen', 0);
$quest_max_swordsmen 				= request_var('quest_max_swordsmen', 0);
$quest_min_legionnaires 			= request_var('quest_min_legionnaires', 0);
$quest_max_legionnaires 			= request_var('quest_max_legionnaires', 0);
$quest_min_knights 					= request_var('quest_min_knights', 0);
$quest_max_knights 					= request_var('quest_max_knights', 0);
$quest_min_slingers 				= request_var('quest_min_slingers', 0);
$quest_max_slingers 				= request_var('quest_max_slingers', 0);
$quest_min_bowmen 					= request_var('quest_min_bowmen', 0);
$quest_max_bowmen 					= request_var('quest_max_bowmen', 0);
$quest_min_long_bowmen 				= request_var('quest_min_long_bowmen', 0);
$quest_max_long_bowmen 				= request_var('quest_max_long_bowmen', 0);
$quest_min_crossbowmen 				= request_var('quest_min_crossbowmen', 0);
$quest_max_crossbowmen 				= request_var('quest_max_crossbowmen', 0);
$quest_min_light_sword_cavalry 		= request_var('quest_min_light_sword_cavalry', 0);
$quest_max_light_sword_cavalry 		= request_var('quest_max_light_sword_cavalry', 0);
$quest_min_heavy_sword_cavalry 		= request_var('quest_min_heavy_sword_cavalry', 0);
$quest_max_heavy_sword_cavalry 		= request_var('quest_max_heavy_sword_cavalry', 0);
$quest_min_light_archer_cavalry 	= request_var('quest_min_light_archer_cavalry', 0);
$quest_max_light_archer_cavalry 	= request_var('quest_max_light_archer_cavalry', 0);
$quest_min_heavy_archer_cavalry 	= request_var('quest_min_heavy_archer_cavalry', 0);
$quest_max_heavy_archer_cavalry 	= request_var('quest_max_heavy_archer_cavalry', 0);
$quest_min_paladin 					= request_var('quest_min_paladin', 0);
$quest_max_paladin 					= request_var('quest_max_paladin', 0);
$quest_min_dragon_knights 			= request_var('quest_min_dragon_knights', 0);
$quest_max_dragon_knights 			= request_var('quest_max_dragon_knights', 0);
$quest_min_rams 					= request_var('quest_min_rams', 0);
$quest_max_rams 					= request_var('quest_max_rams', 0);
$quest_min_catapults 				= request_var('quest_min_catapults', 0);
$quest_max_catapults 				= request_var('quest_max_catapults', 0);
$quest_min_heavy_catapults 			= request_var('quest_min_heavy_catapults', 0);
$quest_max_heavy_catapults 			= request_var('quest_max_heavy_catapults', 0);
$quest_min_ballistas 				= request_var('quest_min_ballistas', 0);
$quest_max_ballistas 				= request_var('quest_max_ballistas', 0);
$quest_min_trebuchets 				= request_var('quest_min_trebuchets', 0);
$quest_max_trebuchets 				= request_var('quest_max_trebuchets', 0);
$quest_min_chimeras 				= request_var('quest_min_chimeras', 0);
$quest_max_chimeras 				= request_var('quest_max_chimeras', 0);
$quest_min_hydras 					= request_var('quest_min_hydras', 0);
$quest_max_hydras 					= request_var('quest_max_hydras', 0);
$quest_min_basilisks 				= request_var('quest_min_basilisks', 0);
$quest_max_basilisks 				= request_var('quest_max_basilisks', 0);
$quest_min_wyverns 					= request_var('quest_min_wyverns', 0);
$quest_max_wyverns 					= request_var('quest_max_wyverns', 0);
$quest_min_leviathans 				= request_var('quest_min_leviathans', 0);
$quest_max_leviathans 				= request_var('quest_max_leviathans', 0);
$quest_min_dragons 					= request_var('quest_min_dragons', 0);
$quest_max_dragons 					= request_var('quest_max_dragons', 0);
$quest_min_land 					= request_var('quest_min_land', 0);
$quest_max_land 					= request_var('quest_max_land', 0);
$quest_min_farms 					= request_var('quest_min_farms', 0);
$quest_max_farms 					= request_var('quest_max_farms', 0);
$quest_min_timber_mills 			= request_var('quest_min_timber_mills', 0);
$quest_max_timber_mills 			= request_var('quest_max_timber_mills', 0);
$quest_min_iron_mines 				= request_var('quest_min_iron_mines', 0);
$quest_max_iron_mines 				= request_var('quest_max_iron_mines', 0);
$quest_min_gold_mines 				= request_var('quest_min_gold_mines', 0);
$quest_max_gold_mines 				= request_var('quest_max_gold_mines', 0);
$quest_min_towers 					= request_var('quest_min_towers', 0);
$quest_max_towers 					= request_var('quest_max_towers', 0);
$quest_min_granaries 				= request_var('quest_min_granaries', 0);
$quest_max_granaries 				= request_var('quest_max_granaries', 0);
$quest_min_woodsheds 				= request_var('quest_min_woodsheds', 0);
$quest_max_woodsheds 				= request_var('quest_max_woodsheds', 0);
$quest_min_ironpits 				= request_var('quest_min_ironpits', 0);  
$quest_max_ironpits 				= request_var('quest_max_ironpits', 0);
$quest_min_vaults 					= request_var('quest_min_vaults', 0);
$quest_max_vaults 					= request_var('quest_max_vaults', 0); 
$quest_chance 						= request_var('quest_chance', 0);

// AOD Config


// Gather some user info
$user_id = $user->data['user_id'];
$account_status = check_account_status($user_id);
if ($account_status == FALSE)
{
	redirect(append_sid("{$phpbb_root_path}/games/index.$phpEx"));
}

// Fetch kingdom data
$king = fetch_kingdom_data($user_id);
$admin_access = $king['admin_access'];
$kingdom_status = $king['kingdom_status'];

// Check to see if this user is a admin staff member
if ($user_id == 2 || $admin_access == 1)
{
	$admin = 1;
}

// Check kingdom status to see if this account is frozen
if($kingdom_status == 1)
{
	// Lets make sure the main admin can't be blocked
	if ($user_id <> 2){
		trigger_error($user->lang['FROZEN'] . back_link());
	}
}

// Post users quest idea for review
if($cmd == $user->lang['SUBMIT'])
{

	if(!$quest_name)
	{
		$error = TRUE;
		$error_msgs .= $user->lang['QUEST_NAME_REQ'];
	}

	if($quest_stamina_req < 1)
	{
		$error = TRUE;
		$error_msgs .= $user->lang['QUEST_STAMINA_REQUIRED'];
	}
		
	if(!$error)
	{	
		$sql_quest_ary = array(
			'quest_name' 						=> $quest_name,
			'quest_descript' 					=> $quest_descript,
			'quest_img_path'					=> $quest_img_path,
			'quest_level_req' 					=> $quest_level_req,
			'quest_net_req' 					=> $quest_net_req,
			'quest_villagers_req' 				=> $quest_villagers_req,
			'quest_spies_req' 					=> $quest_spies_req,
			'quest_soldiers_req' 				=> $quest_soldiers_req,
			'quest_macemen_req' 				=> $quest_macemen_req,
			'quest_axemen_req' 					=> $quest_axemen_req,
			'quest_spearmen_req' 				=> $quest_spearmen_req,
			'quest_swordsmen_req' 				=> $quest_swordsmen_req,
			'quest_legionnaires_req' 			=> $quest_legionnaires_req,
			'quest_knights_req' 				=> $quest_knights_req,
			'quest_slingers_req' 				=> $quest_slingers_req,
			'quest_bowmen_req' 					=> $quest_bowmen_req,
			'quest_long_bowmen_req' 			=> $quest_long_bowmen_req,
			'quest_crossbowmen_req' 			=> $quest_crossbowmen_req,
			'quest_light_sword_cavalry_req' 	=> $quest_light_sword_cavalry_req,
			'quest_heavy_sword_cavalry_req' 	=> $quest_heavy_sword_cavalry_req,
			'quest_light_archer_cavalry_req' 	=> $quest_light_archer_cavalry_req,
			'quest_heavy_archer_cavalry_req' 	=> $quest_heavy_archer_cavalry_req,
			'quest_paladin_req' 				=> $quest_paladin_req,
			'quest_dragon_knights_req' 			=> $quest_dragon_knights_req,
			'quest_rams_req' 					=> $quest_rams_req,
			'quest_catapults_req' 				=> $quest_catapults_req,
			'quest_heavy_catapults_req' 		=> $quest_heavy_catapults_req,
			'quest_ballistas_req' 				=> $quest_ballistas_req,
			'quest_trebuchets_req' 				=> $quest_trebuchets_req,
			'quest_chimeras_req' 				=> $quest_chimeras_req,
			'quest_hydras_req' 					=> $quest_hydras_req,
			'quest_basilisks_req' 				=> $quest_basilisks_req,
			'quest_wyverns_req' 				=> $quest_wyverns_req,
			'quest_leviathans_req' 				=> $quest_leviathans_req,
			'quest_dragons_req' 				=> $quest_dragons_req,
			'quest_farms_req' 					=> $quest_farms_req,
			'quest_timber_mills_req' 			=> $quest_timber_mills_req,
			'quest_iron_mines_req' 				=> $quest_iron_mines_req,
			'quest_gold_mines_req' 				=> $quest_gold_mines_req,
			'quest_towers_req' 					=> $quest_towers_req,
			'quest_granaries_req' 				=> $quest_granaries_req,
			'quest_woodsheds_req' 				=> $quest_woodsheds_req,
			'quest_ironpits_req' 				=> $quest_ironpits_req,
			'quest_vaults_req' 					=> $quest_vaults_req,
			'quest_land_req' 					=> $quest_land_req,
			'quest_stamina_req' 				=> $quest_stamina_req,
			'quest_gold_req' 					=> $quest_gold_req,
			'quest_food_req' 					=> $quest_food_req,
			'quest_wood_req' 					=> $quest_wood_req,
			'quest_iron_req' 					=> $quest_iron_req,
			'quest_min_villagers' 				=> $quest_min_villagers,
			'quest_max_villagers' 				=> $quest_max_villagers,
			'quest_min_gold' 					=> $quest_min_gold,
			'quest_max_gold' 					=> $quest_max_gold,
			'quest_min_food' 					=> $quest_min_food,
			'quest_max_food' 					=> $quest_max_food,
			'quest_min_wood' 					=> $quest_min_wood,
			'quest_max_wood' 					=> $quest_max_wood,
			'quest_min_iron' 					=> $quest_min_iron,
			'quest_max_iron' 					=> $quest_max_iron,
			'quest_min_dragoncoins' 			=> $quest_min_dragoncoins,
			'quest_max_dragoncoins' 			=> $quest_max_dragoncoins,
			'quest_min_exp' 					=> $quest_min_exp,
			'quest_max_exp' 					=> $quest_max_exp,
			'quest_min_soldiers' 				=> $quest_min_soldiers,
			'quest_max_soldiers' 				=> $quest_max_soldiers,
			'quest_min_spies' 					=> $quest_min_spies,
			'quest_max_spies' 					=> $quest_max_spies,
			'quest_min_macemen' 				=> $quest_min_macemen,
			'quest_max_macemen' 				=> $quest_max_macemen,
			'quest_min_axemen' 					=> $quest_min_axemen,
			'quest_max_axemen' 					=> $quest_max_axemen,
			'quest_min_spearmen' 				=> $quest_min_spearmen,
			'quest_max_spearmen' 				=> $quest_max_spearmen,
			'quest_min_swordsmen' 				=> $quest_min_swordsmen,
			'quest_max_swordsmen' 				=> $quest_max_swordsmen,
			'quest_min_legionnaires' 			=> $quest_min_legionnaires,
			'quest_max_legionnaires' 			=> $quest_max_legionnaires,
			'quest_min_knights' 				=> $quest_min_knights,
			'quest_max_knights' 				=> $quest_max_knights,
			'quest_min_slingers' 				=> $quest_min_slingers,
			'quest_max_slingers' 				=> $quest_max_slingers,
			'quest_min_bowmen' 					=> $quest_min_bowmen,
			'quest_max_bowmen' 					=> $quest_max_bowmen,
			'quest_min_long_bowmen' 			=> $quest_min_long_bowmen,
			'quest_max_long_bowmen' 			=> $quest_max_long_bowmen,
			'quest_min_crossbowmen' 			=> $quest_min_crossbowmen,
			'quest_max_crossbowmen' 			=> $quest_max_crossbowmen,
			'quest_min_light_sword_cavalry' 	=> $quest_min_light_sword_cavalry,
			'quest_max_light_sword_cavalry' 	=> $quest_max_light_sword_cavalry,
			'quest_min_heavy_sword_cavalry' 	=> $quest_min_heavy_sword_cavalry,
			'quest_max_heavy_sword_cavalry' 	=> $quest_max_heavy_sword_cavalry,
			'quest_min_light_archer_cavalry' 	=> $quest_min_light_archer_cavalry,
			'quest_max_light_archer_cavalry' 	=> $quest_max_light_archer_cavalry,
			'quest_min_heavy_archer_cavalry' 	=> $quest_min_heavy_archer_cavalry,
			'quest_max_heavy_archer_cavalry' 	=> $quest_max_heavy_archer_cavalry,
			'quest_min_paladin' 				=> $quest_min_paladin,
			'quest_max_paladin' 				=> $quest_max_paladin,
			'quest_min_dragon_knights' 			=> $quest_min_dragon_knights,
			'quest_max_dragon_knights' 			=> $quest_max_dragon_knights,
			'quest_min_rams' 					=> $quest_min_rams,
			'quest_max_rams' 					=> $quest_max_rams,
			'quest_min_catapults' 				=> $quest_min_catapults,
			'quest_max_catapults' 				=> $quest_max_catapults,
			'quest_min_heavy_catapults' 		=> $quest_min_heavy_catapults,
			'quest_max_heavy_catapults' 		=> $quest_max_heavy_catapults,
			'quest_min_ballistas' 				=> $quest_min_ballistas,
			'quest_max_ballistas' 				=> $quest_max_ballistas,
			'quest_min_trebuchets' 				=> $quest_min_trebuchets,
			'quest_max_trebuchets' 				=> $quest_max_trebuchets,
			'quest_min_chimeras' 				=> $quest_min_chimeras,
			'quest_max_chimeras' 				=> $quest_max_chimeras,
			'quest_min_hydras' 					=> $quest_min_hydras,
			'quest_max_hydras' 					=> $quest_max_hydras,
			'quest_min_basilisks' 				=> $quest_min_basilisks,
			'quest_max_basilisks' 				=> $quest_max_basilisks,
			'quest_min_wyverns' 				=> $quest_min_wyverns,
			'quest_max_wyverns' 				=> $quest_max_wyverns,
			'quest_min_leviathans' 				=> $quest_min_leviathans,
			'quest_max_leviathans' 				=> $quest_max_leviathans,
			'quest_min_dragons' 				=> $quest_min_dragons,
			'quest_max_dragons' 				=> $quest_max_dragons,
			'quest_min_land' 					=> $quest_min_land,
			'quest_max_land' 					=> $quest_max_land,
			'quest_min_farms' 					=> $quest_min_farms,
			'quest_max_farms' 					=> $quest_max_farms,
			'quest_min_timber_mills' 			=> $quest_min_timber_mills,
			'quest_max_timber_mills'		 	=> $quest_max_timber_mills,
			'quest_min_iron_mines' 				=> $quest_min_iron_mines,
			'quest_max_iron_mines' 				=> $quest_max_iron_mines,
			'quest_min_gold_mines' 				=> $quest_min_gold_mines,
			'quest_max_gold_mines' 				=> $quest_max_gold_mines,
			'quest_min_towers' 					=> $quest_min_towers,
			'quest_max_towers' 					=> $quest_max_towers,
			'quest_min_granaries' 				=> $quest_min_granaries,
			'quest_max_granaries' 				=> $quest_max_granaries,
			'quest_min_woodsheds' 				=> $quest_min_woodsheds,
			'quest_max_woodsheds' 				=> $quest_max_woodsheds,
			'quest_min_ironpits' 				=> $quest_min_ironpits,  
			'quest_max_ironpits' 				=> $quest_max_ironpits,
			'quest_min_vaults' 					=> $quest_min_vaults,
			'quest_max_vaults' 					=> $quest_max_vaults, 
			'quest_chance' 						=> $quest_chance,
			'quest_approved' 					=> 0,
		);
		
		add_quest($sql_quest_ary);					
	
		$return_link = '<br><br><a href="'.append_sid("{$phpbb_root_path}games/aod/quests.$phpEx").'">'.$user->lang['GO_BACK_LINK'].'</a>';
		trigger_error($user->lang['NEW_QUEST_ADDED'].$return_link);	
	}
}



for ( $i=0; $i <= 99; ++$i )
{ 
	if($i == 0){
		$chance_options .= '<option value="'.$i.'">'.$i.' - '.$user->lang['EASIEST'].'</option>';
	}elseif($i == 25){
		$chance_options .= '<option value="'.$i.'">'.$i.' - '.$user->lang['EASY'].'</option>';
	}elseif($i == 50){
		$chance_options .= '<option value="'.$i.'">'.$i.' - '.$user->lang['50_50'].'</option>';
	}elseif($i == 75){
		$chance_options .= '<option value="'.$i.'">'.$i.' - '.$user->lang['HARD'].'</option>';
	}elseif($i == 99){
		$chance_options .= '<option value="'.$i.'">'.$i.' - '.$user->lang['HARDEST'].'</option>';
	}else{
		$chance_options .= '<option value="'.$i.'">'.$i.'</option>';
	}
}
		
// Display an error messages to the user
if($error_msgs){
	$error_msgs = '<span class="errormsg"><b>'.$error_msgs.'</b></span>';
}

$template->assign_vars(array(
	'CHANCE_OPTIONS'		=> $chance_options,
	)
);

include($phpbb_root_path . 'games/aod/includes/page_header.' . $phpEx);

// Output page
page_header($game_name.' - '.$user->lang['QUESTS']);

$template->set_filenames(array(
	'body' => $templates_path.'questpost_body.html')
);

page_footer();
?>